<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="./js/vue.js"></script>
</head>

<body>
    <div id="app">
        <input type="number" v-model="num">
        <ul>
            <li>
                <h3>名称:{{name}}</h3>
                <p>单价：{{price}}</p>
                <p>总价：{{price*num}}</p>
            </li>
        </ul>


    </div>

    <script>
        new Vue({
            el: "#app",
            data: {
                name:"西瓜",
                price:5,
                num:0
            },
            methods: {

            }
        })
    </script>

</body>

</html>